﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="DangKy.aspx.cs" Inherits="DangKy" Title="Đăng ký" %>
<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <style type="text/css">
        .style1
        {
            width: 30%;
            height: 22px;
            text-align: left;
            font-weight:bold;
        }
        
        .style2
        {
            width: 70%;
            height: 22px;
            text-align:left;
        }
        .capchar
        {
        	text-align:left;
        }
        .textbox
        {
        	text-align:left;
        }
        .ddlist
        {
        	font-weight:bold;
        }
         .stylebutton
        {
        	text-align:center;
        	color:Gray;
        	font-size:medium;
        	font-weight:bold;
        	
        }
    </style>
    

  <table border="10" cellpadding="6" cellspacing="1" width="100%" style="background-color:White;">
                <tr>
                    <td style="text-align:center color:Blue;"><h1 style="text-align:center;">Đăng ký thành viên</h1></td>
                </tr>
                <tr>
                <td>
                     <table id="Detail" width="100%" align="center" border="2" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="center" colspan="2" 
                            style="height:30px;" bgcolor="#33CCFF">
                            <asp:Label ID="Label1" Text="Thông tin đăng nhập" Font-Bold="true" ForeColor="Black" runat="server" Font-Size="Larger"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Tên đăng nhập</td>
                        
                        <td class="style2">
                            <asp:TextBox ID="txtTenDanhNhap" runat="server" Width="245px" MaxLength="50" 
                                CssClass="textbox"></asp:TextBox>
                            <asp:Label ID="lbThongBaoLoiTenDangNhap" runat="server" ForeColor="Red" Visible="false" Text="Ten dang nhap da ton tai"></asp:Label>
                            <asp:RequiredFieldValidator ID="vrTenDangNhap" runat="server" 
                                ControlToValidate="txtTenDanhNhap" ErrorMessage="abc">*</asp:RequiredFieldValidator>
                            <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                ControlToValidate="TenDanhNhap" ErrorMessage="RegularExpressionValidator" 
                                ValidationExpression="[\w|\d|_]{8}">Tên đăng nhập không hợp lệ. Tên đăng nhập chỉ 
                            bao gồm các chữ cái, số và dấu &quot;_&quot; và không ngắn hơn 8 kí tự</asp:RegularExpressionValidator>--%>
                        </td>
                    </tr>
                    
                      <tr>
                        <td class="style1">
                            Mật khẩu 
                        </td>
                        
                        <td class="style2">
                            <asp:TextBox ID="txtMatKhau" runat="server" Width="200px" TextMode="Password" 
                                MaxLength="30" CssClass="textbox"></asp:TextBox>
                             
                           
                            <asp:RequiredFieldValidator ID="vrMatKhau" runat="server" 
                                ControlToValidate="txtMatKhau" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                        </td>
                       
                    </tr>
                    
                      <tr>
                        <td class="style1">Nhắc lại mật khẩu</td>
                        
                        <td class="style2">
                            <asp:TextBox ID="txtNhacLaiMatKhau" runat="server" Width="200px"
                                TextMode="Password" MaxLength="30" CssClass="textbox"></asp:TextBox>
                        
                            <asp:RequiredFieldValidator ID="vrNhacLaiMatKhau" runat="server" 
                                ControlToValidate="txtNhacLaiMatKhau" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="vcNhacLaiMatKhau" runat="server" 
                                ControlToCompare="txtMatKhau" ControlToValidate="txtNhacLaiMatKhau" 
                                ErrorMessage="CompareValidator">Mật khẩu không giống nhau</asp:CompareValidator>
                        
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="style1">
                            Mã an toàn
                        </td>
                        <td class="style2">
                            <cc1:CaptchaControl ID="CapchaSecurity" runat="server" CssClass="capchar"/>
                        </td>
                    </tr>
                    
                    <tr>
                        <td class="style1">
                            Xác nhận mật mã
                        </td>
                        
                        <td class="style2">
                            <asp:TextBox ID="txtXacNhanMatMa" runat="server" CssClass="textbox"></asp:TextBox>
                            
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                ControlToValidate="txtXacNhanMatMa" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                            
                            <br />
                            <asp:CustomValidator ID="FailCode" runat="server" Text="Ma an toan khong chinh xac" Display="Dynamic"></asp:CustomValidator>
                        </td>
                    </tr>
                    
                      <tr>
                        <td align="center" colspan="2" 
                            style=" height:30px;" bgcolor="#33CCFF">
                         
                            <asp:Label ID="lbThongTinCaNhan" Text="Thông tin cá nhân" Font-Bold="true" ForeColor="Black" runat="server" Font-Size="Larger">
                            </asp:Label>
                        </td>
                        
                    </tr>
                    
                      <tr>
                        <td class="style1" >
                            Họ tên</td>
                        
                        <td class="style2">
                            <asp:TextBox ID="txtHoTen" runat="server" Width="245px" MaxLength="35" 
                                CssClass="textbox"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                ControlToValidate="txtHoTen" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    
                      <tr>
                        <td class="style1">
                            Ngày sinh</td>
                        
                        <td class="style2">
                           
                            <asp:DropDownList ID="ddlNgay" runat="server" Width="80px" Height="25px" 
                                CssClass="ddlist"></asp:DropDownList>
                            <asp:Label Text="/" runat="server" Width="20px" Height="25px" Font-Bold="true"></asp:Label>
                            
                            <asp:DropDownList ID="ddlThang" runat="server" Width="80px" Height="25px" 
                                CssClass="ddlist"></asp:DropDownList>
                            <asp:Label Text="/" runat="server" Width="20px" Height="25px" Font-Bold="true"></asp:Label>
                            
                            <asp:DropDownList ID="ddlNam" runat="server" Width="80px" Height="25px" 
                                CssClass="ddlist"></asp:DropDownList>
                            
                            
                            <asp:CompareValidator ID="CompareValidator2" runat="server" 
                                ControlToValidate="ddlNgay" ErrorMessage="CompareValidator" 
                                Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
                            <asp:CompareValidator ID="CompareValidator3" runat="server" 
                                ControlToValidate="ddlThang" ErrorMessage="CompareValidator" 
                                Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
                            <asp:CompareValidator ID="CompareValidator4" runat="server" 
                                ControlToValidate="ddlNam" ErrorMessage="CompareValidator" 
                                Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
                            
                            
                        </td>
                    </tr>
                    
                      <tr>
                        <td class="style1">
                            Giới tính</td>
                        
                        <td class="style2">
                            <input id="GioiTinhNam" type="radio" name="GioiTinh" runat="server" 
                               />Nam &nbsp; &nbsp; &nbsp;
                            <input id="GioiTinhNu" type="radio" name="GioiTinh" runat="server"/>Nữ
                        </td>
                    </tr>
                    
                      <tr>
                        <td class="style1">
                            Email</td>
                        
                        <td class="style2">
                            <asp:TextBox ID="txtEmail" runat="server" Width="245px" MaxLength="50" 
                                CssClass="textbox"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                ControlToValidate="txtEmail" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                ControlToValidate="txtEmail" ErrorMessage="RegularExpressionValidator" 
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">Email 
                            không hợp lệ</asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    
                      <tr>
                        <td align="center" colspan="2" 
                            style="height:30px;" bgcolor="#33CCFF">
                            <asp:Label ID="lbThongTinBoSung" Text="Thông tin bổ sung" Font-Bold="true" ForeColor="Black" runat="server" Font-Size="Larger"></asp:Label>
                        </td>
                     </tr>    
                        <tr>
                            <td class="style1">Số điện thoại</td>
                            <td class="style2">
                                <asp:TextBox ID="txtSoDienThoai" runat="server" Width="200px" MaxLength="11" 
                                    CssClass="textbox"></asp:TextBox>
                                <asp:CompareValidator ID="CompareValidator5" runat="server" 
                                    ControlToValidate="txtSoDienThoai" ErrorMessage="CompareValidator" 
                                    Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
                            </td>
                        </tr>
                       
                    <tr>
                            <td class="style1" >CMND</td>
                            <td class="style2">
                                <asp:TextBox ID="txtCMND" runat="server" Width="200px" MaxLength="10" 
                                    CssClass="textbox"></asp:TextBox>
                                <asp:CompareValidator ID="CompareValidator6" runat="server" 
                                    ControlToValidate="txtCMND" ErrorMessage="CompareValidator" 
                                    Operator="DataTypeCheck" Type="Integer">*</asp:CompareValidator>
                            </td>
                        </tr>
                         <tr>
                            <td class="style1">Địa chỉ</td>
                            <td class="style2">
                            <asp:TextBox ID="txtDiaChi" runat="server" TextMode="MultiLine" Width="278px" 
                                    CssClass="textbox"></asp:TextBox>
                                
                                </td>
                        </tr>
                        
                        <tr >
                            <td align="center" colspan="2" 
                            style="text-align:center;"> 
                            <asp:Label ID="abc" runat="server" Text="giới thiệu sơ"></asp:Label>
                            </td>
                        </tr>
                        
                        <tr>
                            <td   colspan="2">
                                <asp:CheckBox  ID="NhanEmailTuThanhVien" Text="Nhận Email từ các thành viên" runat="server" Checked="true" />
                            </td>
                        </tr>
                        
                        <tr>
                            <td colspan="2">
                                <asp:CheckBox ID="NhanEmailTuBanQuanTri" Text="Nhận Email khi có thông tin về sản phẩm mới" runat="server" Checked="true" />
                            </td>
                        </tr>
                        
                    
                       <tr>
                       
                        <td colspan="2" style="text-align:center;">
                            <asp:Button CssClass="stylebutton" runat="server" Text="Dang Ky" ID="OK" 
                                onclick="OK_Click" UseSubmitBehavior="true" ForeColor="#FF6600" />
                        </td>
                       </tr>
                       
                    
                    
                </table>
            </td>
           </tr>
                  
           </table>
</asp:Content>

